$(function () {
//*******************************************************初始化操作**********************************************************
        initTextSearch("#pIsvName"
            ,basePath + 'health/searchIsvList?t='+ (new Date()).getTime()+'&isvName='
            ,['isvPid','isvName'],{'isvPid':"服务商pid",'isvName':'服务商名称'}
            ,'isvPid','isvName'
            ,true,
            selectPisvValue,
            noSelectPisvValue,
            false
        );
        initTextSearch("#pDocName"
            ,basePath + 'health/searchDocList?t='+ (new Date()).getTime()+'&docName='
            ,['docCode','docName'],{'docCode':"专家编码",'docName':'专家姓名'}
            ,'docName','docName'
            ,true,
            selectPdocValue,
            noSelectPdocValue,
            false
        );

        laydate.render({
            elem: '#topTime'
            ,type: 'datetime'
            ,range: true //或 range: '~' 来自定义分割字符
            // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", preDate) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", curDate)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true

        });
        laydate.render({
            elem: '#freeTime'
            ,type: 'datetime'
            ,range: true //或 range: '~' 来自定义分割字符
           // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", freeStarttime) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", freeEndtime)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true
        });
        laydate.render({
            elem: '#dialogTime1'
            ,type: 'datetime'
            //,range: true //或 range: '~' 来自定义分割字符
            // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", freeStarttime) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", freeEndtime)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true
            //,value: new Date()
        });
        laydate.render({
            elem: '#dialogTime2'
            ,type: 'datetime'
            //,range: true //或 range: '~' 来自定义分割字符
            // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", freeStarttime) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", freeEndtime)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true
            //,value: new Date()
        });
        laydate.render({
            elem: '#dialogTime3'
            ,type: 'datetime'
            //,range: true //或 range: '~' 来自定义分割字符
            // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", freeStarttime) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", freeEndtime)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true
            //,value: new Date()
        });
        laydate.render({
            elem: '#dialogTime4'
            ,type: 'datetime'
            //,range: true //或 range: '~' 来自定义分割字符
            // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", freeStarttime) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", freeEndtime)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true
            //,value: new Date()
        });
        laydate.render({
            elem: '#dialogTime5'
            ,type: 'datetime'
            //,range: true //或 range: '~' 来自定义分割字符
            // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", freeStarttime) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", freeEndtime)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true
            //,value: new Date()
        });
        laydate.render({
            elem: '#dialogTime6'
            ,type: 'datetime'
            //,range: true //或 range: '~' 来自定义分割字符
            // ,value: dateFtt("yyyy-MM-dd hh:mm:ss", freeStarttime) + ' - ' + dateFtt("yyyy-MM-dd hh:mm:ss", freeEndtime)
            //js赋值重置失效，改为就是怕、页面赋值
            ,isInitValue: true //是否允许填充初始值，默认为 true
            //,start: laydate.now(0, 'YYYY-MM-DD hh:mm:ss')
            //,value: new Date()
        });
    if($("#isTop").val() == 'N'){
        $("#topDiv").hide();
        $("#topTime").attr("required","false");
    }else{
        $("#topTime").attr("required","true");
    }
    if($("#sample").val() == 'N'){
        $("#freeDiv").hide();
        $("#freeDiv").attr("required","false");
    }

    if($("#isHaveFreeTime").val() == 'N'){
        $("#freeTimeDiv").hide();
        $("#freeTime").attr("required","false");
    }else{
        $("#freeTime").attr("required","true");
    }

    if($("#isFree").val() == 'N'){
        $("#price").attr("required","true");
        $("#price").attr("readOnly",false);
    }else{
        $("#price").val('0');
        $("#price").attr("required","false");
        $("#price").attr("readOnly","true");
    }

    //初始化课程列表
    var id = $("#hiddenId").val();
    if( id == '' || id == null){
        var data = getFromData('#contentForm');
        contentDto.bizCode = data.bizCode;
        contentDto.showType = data.showType;
        contentDto.contentType = data.contentType;
        contentDto.isFree = data.isFree;
        contentDto.isHaveFreeTime = data.isHaveFreeTime;
        contentDto.isPlatformCharge = data.isPlatformCharge;
        contentDto.isTop = data.isTop;
        contentDto.hasMidPage = data.hasMidPage;
        contentDto.sample = data.sample;
    }
});


//*******************************************************加载科室信息**********************************************************
function loadTwoData(value, selectValue){
    $.ajax({
        type: 'post',
        url: basePath + 'health/loadDeptTwo?deptOne='+value,
        dataType: 'json',
        contentType: "application/json",
        success : function (data) {
            if(data.result== true){
                    $("#deptNameTwo").val('');
                    var htmlStr = '<option value="">--请选择--</option>';
                    if (data.content) {
                        for (var i=0; i<data.content.length; i++) {
                            htmlStr += '<option value="'+data.content[i].deptCode+'">'+data.content[i].deptName+'</option>';
                        }
                    }
                    $("#deptNameTwo").html(htmlStr);
                    if(selectValue){
                        $("#deptNameTwo").val(selectValue);
                    }
            }else{
                toastr.error("加载数据失败");
            }
        },
        error: function (request) {
            toastr.error(common_system_error);
        }
    });
}
function addLoadTwoData(value){
    $("#deptSecName").val('');
    doSickRefresh();
    $.ajax({
        type: 'post',
        url: basePath + 'health/loadDeptTwo?deptOne='+value,
        dataType: 'json',
        contentType: "application/json",
        success : function (data) {
            if(data.result== true){
                $("#deptSecName").val('');
                var htmlStr = '<option value="">--请选择--</option>';
                //var htmlStr = '';
                if (data.content) {
                    for (var i=0; i<data.content.length; i++) {
                        htmlStr += '<option value="'+data.content[i].deptCode+'">'+data.content[i].deptName+'</option>';
                    }
                }
                $("#deptSecName").html(htmlStr);
            }else{
                toastr.error("加载数据失败");
            }
        },
        error: function (request) {
            toastr.error(common_system_error);
        }
    });
}

function selectPisvValue(data){
    if (!data || !data.isvPid) {
        return;
    }
    $('#PisvPid').val(data.isvPid);
}

function noSelectPisvValue(){
    $('#PisvPid').val("");
}

function selectPdocValue(data){
    if (!data || !data.docCode) {
        return;
    }
    $('#pDocCode').val(data.docCode);
    $.ajax({
        type: 'post',
        url: basePath + 'health/loadDocDept?docCode='+data.docCode,
        dataType: 'json',
        contentType: "application/json",
        success : function (r) {
            if(r.result== true){
                $("#deptNameOne").val(r.content.pDeptCode);
                loadTwoData(r.content.pDeptCode,r.content.cDeptCode);
            }else{
                toastr.error("加载数据失败");
            }
        },
        error: function (request) {
            toastr.error(common_system_error);
        }
    });
}
function noSelectPdocValue(){
    $('#pDocCode').val("");
}

function selectSick(){
    $("#sick").val("");
    $("#deptFirName").val("");
    $("#deptSecName").val("");
    doSickRefresh();
    $("#selectSick").modal(true);
}

function cancelSick(){
    $("#deptFirName").val("");
    $("#deptSecName").val("");
    $("#sick").val("");
    $("#selectSick").modal('hide');
}

function doSickRefresh() {
    var sick = $("#sick").val();
    var deptFirName = $("#deptFirName").val();
    var deptSecName = $("#deptSecName").val();
    if(sick == null){
        sick = '';
    }
    if(deptFirName == null){
        deptFirName = '';
    }
    if(deptSecName == null){
        deptSecName = '';
    }
    $('#dataTable').bootstrapTable('refresh', {
        url: basePath + 'health/getGridDataForCheckbox?sicknessName='+sick+'&oneLevelDeptCode='+deptFirName+'&twoLevelDeptCode='+deptSecName+'&t='+new Date().getTime(),
    });
}

function getParams(params) {
    var sickList  = getlableNote('sicknessName',false).join(",");
    if(sickList == ','){
        sickList = '';
    }
    var postData = {
        sicknessListStr : sickList,
        pageSize : params.pageSize,
        pageNo : params.pageNumber
    };
    return postData;
}


$('#dataTable').on("click-row.bs.table", function (e, row, $element) {
    // checkBox 的勾选
    var index = $element[0].rowIndex - 1;
    $('#dataTable').bootstrapTable('uncheckAll');
    $('#dataTable').bootstrapTable('check', index);
});

function doRefresh() {
    $('#dataTable').bootstrapTable('refresh', {
        url: basePath + 'health/healthContentPage?t='+new Date().getTime()
    });
}


function clickSick() {
    var sickList=[];
    var sicks=getSelectedRows('#dataTable');
    for (var cell in sicks){
        sickList.push({value:sicks[cell].refCode,text:sicks[cell].sicknessName});
    }
    $('#selectSick').modal('hide');
    addLableByList(sickList,"sicknessName");
}


//**********************************************************************************************************************

function changeTop(value){
    if(value == 'N'){
        $("#topDiv").hide();
        $("#topTime").val('');
        $("#topTime").attr("required","false");
    }else{
        $("#topDiv").show();
        $("#topTime").attr("required","true");
    }
}


function changeFreeTime(value){
    if(value == 'N'){
        $("#freeTimeDiv").hide();
        $("#freeTime").val();
        $("#freeTime").attr("required","false");
    }else{
        $("#freeTimeDiv").show();
        $("#freeTime").attr("required","true");
    }
}

function changeIsFree(value) {
    if(value == 'N'){
        $("#price").val('');
        $("#price").attr("required","true");
        $("#price").attr("readOnly",false);
    }else{
        $("#price").val('0');
        $("#price").attr("required","false");
        $("#price").attr("readOnly","true");
    }
}

function checkPrice(value){
    if(Number(value) <= 0){
        toastr.error('现价必须大于0');
        $("#price").val('');
    }
}

function doCheckImage() {
    var idlistStr = getlableNote('sicknessName', false).join(",");
    if (idlistStr == '' || idlistStr == null) {
        toastr.error("请添加对应疾病!");
        return;
    }
    if(!$("#contentForm").valid()) return;//校验不通过
    if(!checkForm()){
        return;
    }
    doSave();
}

function checkForm(){
        if (($("#originPrice").val() != '') && (Number($("#originPrice").val()) < Number($("#price").val()))) {
            toastr.error("原价必须大于或等于现价!");
            return false;
        }

        if($("#dialogContent1").val() == null || $("#dialogContent1").val() == ''){
            toastr.error("请填写第一次提问内容");
            return false;
        }

        if($("#dialogContent2").val() == null || $("#dialogContent2").val() == ''){
            toastr.error("请填写第一次回复内容");
            return false;
        }
        for(var i = 3 ; i <= 6 ;i++){
            if( $("#dialogContent" + i).val() != ''  &&  $("#dialogContent" + (i-1)).val() == '' ){
                toastr.error("请填写上一次内容");
                return false;
            }
        }
        for(var i = 2 ; i <= 6 ;i++){
            var lastTime = $("#dialogTime" + i).val();
            var earlyTime = $("#dialogTime" + (i-1)).val();
            if( earlyTime != ''  && lastTime  != '' ){
                var earlyTimeStr = Date.parse(earlyTime);
                var lastTimeStr = Date.parse(lastTime);
                if(earlyTimeStr > lastTimeStr){
                    toastr.error("下一次问答时间必须大于上一次问答时间");
                    return false;
                }
            }
            if(earlyTime == ''  && lastTime != '' && $("#dialogContent" + (i-1)).val() != ''){
                var earlyTimeStr = Date.parse(new Date());
                var lastTimeStr = Date.parse(lastTime);
                if(earlyTimeStr > lastTimeStr){
                    toastr.error("下一次问答时间必须大于上一次问答时间");
                    return false;
                }
            }
            if(earlyTime != ''  && lastTime == '' && $("#dialogContent" + i).val() != ''){
                var earlyTimeStr = Date.parse(earlyTime);
                var lastTimeStr = Date.parse(new Date());
                if(earlyTimeStr > lastTimeStr){
                    toastr.error("下一次问答时间必须大于上一次问答时间");
                    return false;
                }
            }
        }
    return true;
}

function doSave(){
    var id = $("#hiddenId").val();
    var contentCode = $("#hiddenContent").val();
    var contentType = $("#hiddenType").val();
    var bizCode = $("#hiddenCode").val();
    var sample = $("#sample").val();
    var additionalRemarks = $("#additionalRemarks").val();
    var idlistStr = getlableNote('sicknessName', false).join(",");
    var data = getFromData('#contentForm');
    var originReadedTotal = (!data.originReadedTotal || data.originReadedTotal == '') ? 0 : data.originReadedTotal;
    var originLikedTotal = (!data.originLikedTotal || data.originLikedTotal == '') ? 0 : data.originLikedTotal;
    var originBuyTotal = (!data.originBuyTotal || data.originBuyTotal == '') ? 0 : data.originBuyTotal;
    var summary = $("#summary").val();
    var tips = $("#tips").val();
    var topStarttimeStr = '';
    var topEndtimeStr = '';
    var timeInterval = $("#topTime").val();
    if(timeInterval){
        var dates = timeInterval.split(' - ');
        if(dates && dates.length >1){
            topStarttimeStr = dates[0];
            topEndtimeStr = dates[1];
        }
    }
    var freeStarttimeStr = '';
    var freeEndtimeStr = '';
    var timeInterval = $("#freeTime").val();
    if(timeInterval){
        var dates = timeInterval.split(' - ');
        if(dates && dates.length >1){
            freeStarttimeStr = dates[0];
            freeEndtimeStr = dates[1];
        }
    }
    var sicknessName = $.trim($("#sicknessName").val());
    var detailLinkUrl = $("#detailLinkUrl").val();
    var basicContentDialogList = [];
    for(var i = 1 ; i <= 6 ;i++){
        var contentDialog = {};
        if($("#dialogContent" + i).val() == null || $("#dialogContent" + i).val() == ''){
            break;
        }
        contentDialog.dialogLevel = $("#level"+i).val();
        contentDialog.dialogTime = $("#dialogTime" + i).val();
        contentDialog.dialogContent = $("#dialogContent" + i).val();
        basicContentDialogList.push(contentDialog);
    }
    var postData = {
        id : data.id,
        bizCode : bizCode,
        showType : data.showType,
        contentCode : contentCode,
        contentType : contentType,
        topStarttime : topStarttimeStr,
        topEndtime : topEndtimeStr,
        isvPid : data.isvPid,
        hasMidPage : data.hasMidPage,
        isTop : data.isTop,
        title : data.title,
        summary : summary,
        tips : tips,
        sample : sample,
        duration : data.duration,
        sample:data.sample,
        docCode : data.docCode,
        oneLevelDeptCode : data.oneLevelDeptCode,
        twoLevelDeptCode : data.twoLevelDeptCode,
        sicknessName : sicknessName,
        isFree : data.isFree,
        isPlatformCharge : data.isPlatformCharge,
        originPrice : data.originPrice,
        price : data.price,
        additionalRemarks : additionalRemarks,
        isHaveFreeTime : data.isHaveFreeTime,
        freeStarttime : freeStarttimeStr,
        freeEndtime : freeEndtimeStr,
        originReadedTotal : originReadedTotal,
        originLikedTotal : originLikedTotal,
        originBuyTotal : originBuyTotal,
        detailLinkUrl : detailLinkUrl,
        idListStr: idlistStr,
        basicContentDialogList : basicContentDialogList,
    };
    var url;
    if(id == null || id == ''){
        url = basePath + 'health/addContent';
    }else{
        url = basePath + 'health/editContent';
    }
    $.ajax({
        type: 'post',
        url: url,
        dataType: 'json',
        contentType : "application/json; charset=UTF-8",
        data: JSON.stringify(postData),
        beforeSend:function () {
            showLoading();
        },
        complete:function(){
            hideLoading();
        },
        success : function (data) {
            if(data.result){
                toastr.success(data.message);
                window.location.href = basePath + 'health/healthContentPage?title='+dto.title+'&gmtCreateStr='+dto.gmtCreateStr+'&dataStatus='+dto.dataStatus+
                    '&fcontentType='+dto.fcontentType+'&oneLevelDeptCode='+dto.oneLevelDeptCode+'&docCode='+dto.docCode+'&docName='+dto.docName+'&isvPid='+dto.isvPid+'&isFree='+dto.isFree
                    +'&isPlatformCharge='+dto.isPlatformCharge+'&isContentType='+dto.isContentType+'&status='+dto.status+'&isvName='+dto.isvName
                    +'&t='+ new Date().getTime()+ '&pageNo=' + dto.pageNo + '&pageSize=' + dto.pageSize;
                //window.location.href = basePath + 'health/healthContentPage?t=' + new Date().getTime();
            }else{
                toastr.error(data.message);
            }
        },
        error: function (request) {
            toastr.error(common_system_error);
        }
    });
}

//*****************************************点击删除按钮**********************************************

function deleAllSick(){
    var r = confirm("删除后无法复原，你确定全部删除吗?");
    if(r == true){
        $(".note_lable[name=sicknessName]").each(function (index,value) {
            $(this).remove();
        });
    }
}

function doCheckDataChange() {
    var data = getFromData('#contentForm');
    var detailLinkUrl = $("#detailLinkUrl").val();
    var freeTime = $("#freeTime").val();
    var topTime = $("#topTime").val();
    var price = $("#price").val();
    if($("#isFree").val() == 'Y'){
        price = null;
    }
    var idlistStr = getlableNote('sicknessName', false).join(",");
    var postData = {
        bizCode : data.bizCode,
        showType : data.showType,
        contentCode : data.contentCode,
        contentType : data.contentType,
        topTime : topTime,
        isvPid : data.isvPid,
        hasMidPage : data.hasMidPage,
        isTop : data.isTop,
        title : data.title,
        summary : data.summary,
        tips : data.tips,
        docCode : data.docCode,
        oneLevelDeptCode : data.oneLevelDeptCode,
        twoLevelDeptCode : data.twoLevelDeptCode,
        isFree : data.isFree,
        isPlatformCharge : data.isPlatformCharge,
        originPrice : data.originPrice,
        price : price,
        additionalRemarks : data.additionalRemarks,
        isHaveFreeTime : data.isHaveFreeTime,
        freeTime : freeTime,
        originReadedTotal : data.originReadedTotal,
        originLikedTotal : data.originLikedTotal,
        originBuyTotal : data.originBuyTotal,
        detailLinkUrl : detailLinkUrl,
    };

    var dialogTime1 = $("#dialogTime1").val();
    var dialogContent1 = $("#dialogContent1").val();
    var dialogTime2 = $("#dialogTime2").val();
    var dialogContent2 = $("#dialogContent2").val();
    var dialogTime3 = $("#dialogTime3").val();
    var dialogContent3 = $("#dialogContent3").val();
    var dialogTime4 = $("#dialogTime4").val();
    var dialogContent4 = $("#dialogContent4").val();
    var dialogTime5 = $("#dialogTime5").val();
    var dialogContent5 = $("#dialogContent5").val();
    var dialogTime6 = $("#dialogTime6").val();
    var dialogContent6 = $("#dialogContent6").val();
    var contentDialog = {};
    contentDialog.firQuestion = dialogTime1;
    contentDialog.firQuestionDialog = dialogContent1;
    contentDialog.firReply = dialogTime2;
    contentDialog.firReplyDialog = dialogContent2;
    contentDialog.secQuestion = dialogTime3;
    contentDialog.secQuestionDialog = dialogContent3;
    contentDialog.secReply = dialogTime4;
    contentDialog.secReplyDialog = dialogContent4;
    contentDialog.thrQuestion = dialogTime5;
    contentDialog.thrQuestionDialog = dialogContent5;
    contentDialog.thrReply = dialogTime6;
    contentDialog.thrReplyDialog = dialogContent6;


    if (!CompareDialog(contentDialog,contentDto.basicContentDialogDto) || !Compare(postData,contentDto) || CompareStr(idlistStr,contentDto.sickList) /*|| CompareDialog(contentDto.basicContentDialogList)*/) {
        swalClosePageToastr(doBack);
        return;
    }
    doBack();
}

function CompareDialog(list){
    var basicContentDialogList = [];
    for(var i = 1 ; i <= 6 ;i++){
        var contentDialog = {};
        if($("#dialogContent" + i).val() == null || $("#dialogContent" + i).val() == ''){
            break;
        }
        contentDialog.dialogLevel = $("#level"+i).val();
        contentDialog.dialogTime = $("#dialogTime" + i).val();
        contentDialog.dialogContent = $("#dialogContent" + i).val();
        basicContentDialogList.push(contentDialog);
    }
    if(list.length != basicContentDialogList.length){
        return true;
    }
    if(contentDto.basicContentDialogDto.firQuestion != dialogTime1 || contentDto.basicContentDialogDto.firQuestionDialog != dialogContent1
         || contentDto.basicContentDialogDto.firReply != dialogTime2 || contentDto.basicContentDialogDto.firReplyDialog != dialogContent2
    || contentDto.basicContentDialogDto.secQuestion != dialogTime3 || contentDto.basicContentDialogDto.secQuestionDialog != dialogContent3
    || contentDto.basicContentDialogDto.secReply != dialogTime4 || contentDto.basicContentDialogDto.secReplyDialog != dialogContent4
    || contentDto.basicContentDialogDto.thrQuestion != dialogTime5 || contentDto.basicContentDialogDto.thrQuestionDialog != dialogContent5
    /*|| contentDto.basicContentDialogDto.thrReply != dialogTime6 || contentDto.basicContentDialogDto.thrReplyDialog != dialogContent6*/){
        return true;
    }
    return false;
}


function CompareStr(str,list){
    if(list == contentDto.sickList){
        var listStr = '';
        for (var i = 0; i <= list.length - 1; i++) {
            if (i < list.length - 1) {
                if (list[i] != '') {
                    listStr += list[i].refCode + ',';
                }
            } else {
                if (list[i] != '') {
                    listStr += list[i].refCode;
                }
            }
        }
        if (str != listStr) {
            return true;
        }
    }
    return false;
}


function doBack() {
    window.location.href = basePath + 'health/healthContentPage?title='+dto.title+'&gmtCreateStr='+dto.gmtCreateStr+'&dataStatus='+dto.dataStatus+
        '&fcontentType='+dto.fcontentType+'&oneLevelDeptCode='+dto.oneLevelDeptCode+'&docCode='+dto.docCode+'&docName='+dto.docName+'&isvPid='+dto.isvPid+'&isFree='+dto.isFree
        +'&isPlatformCharge='+dto.isPlatformCharge+'&isContentType='+dto.isContentType+'&status='+dto.status+'&isvName='+dto.isvName
        +'&t='+ new Date().getTime()+ '&pageNo=' + dto.pageNo + '&pageSize=' + dto.pageSize;
}

function onClickTab(obj) {
    var id = $(obj).attr('id');
    if (id == '_tab1') {
        $('#_tab1').addClass('active');
        $('#_tab2').removeClass('active');
        $('#_tab3').removeClass('active');
        $('#_div2').css('display', 'none');
        $('#_div3').css('display', 'none');
        $('#_div1').css('display', 'block');
    } else if (id == '_tab2') {
        $('#_tab2').addClass('active');
        $('#_tab1').removeClass('active');
        $('#_tab3').removeClass('active');
        $('#_div1').css('display', 'none');
        $('#_div3').css('display', 'none');
        $('#_div2').css('display', 'block');
    }
}


function cancel(){
    window.location.href = basePath + 'health/healthContentPage?t=' + new Date().getTime();
}

//********************************************************添加系列************************************************************

$('#dataSeriesTable').on("click-row.bs.table", function (e, row, $element) {
    // checkBox 的勾选
    var index = $element[0].rowIndex - 1;
    $('#dataSeriesTable').bootstrapTable('uncheckAll');
    $('#dataSeriesTable').bootstrapTable('check', index);
});






